import request from '@/utils/request'

export function getList(page, limit, roleQuery) {
  return request({
    url: `/admin/acl/role/list/${page}/${limit}`,
    method: 'post',
    data: roleQuery
  })
}

export function getRole(id) {
  return request({
    url: `/admin/acl/role/getRole/${id}`,
    method: 'get'
  })
}

export function remove(id) {
  return request({
    url: `/admin/acl/role/remove/${id}`,
    method: 'delete'
  })
}

export function save(role) {
  return request({
    url: `/admin/acl/role/save`,
    method: 'post',
    data: role
  })
}

export function update(role) {
  return request({
    url: `/admin/acl/role/update`,
    method: 'post',
    data: role
  })
}

export function updateStatus(role) {
  return request({
    url: `/admin/acl/role/updateStatus`,
    method: 'post',
    data: role
  })
}

export function getRoutes() {
  return request({
    url: `/admin/acl/menu/getMenus`,
    method: 'get'
  })
}
